<template>
    
    <!-- 组件的模板 -->
    <div class="page">        
        <div class="weui-cells weui-cells_radio">
            <label class="weui-cell weui-check__label" @click="setType(7)">
                <div class="weui-cell__bd">
                    7天内未工作
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" :id="7" v-bind:checked="selectedIdentityId == 7">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label" @click="setType(15)">
                <div class="weui-cell__bd">
                    15天内未工作
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" :id="15" v-bind:checked="selectedIdentityId == 15">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
            <label class="weui-cell weui-check__label" @click="setType(30)">
                <div class="weui-cell__bd">
                    30天内未工作
                </div>
                <div class="weui-cell__ft">
                    <input type="radio" class="weui-check" name="radio1" :id="30" v-bind:checked="selectedIdentityId == 30">
                    <span class="weui-icon-checked"></span>
                </div>
            </label>
        </div>
    </div> 
        
</template>

<script>
    /**
     *  引入工具类库 或 Native API
     *  example : import widget from 'gapi/widget'
     */
    import cache from 'gapi/cache'
    import commonPage from 'clientApi/commonPage.js'
    import * as util from 'js/util.js'
    /**
     *  引入组件 以及 组件接口(Action)
     *  example : import Somecomponents from 'components/Somecomponents/Somecomponents'
     */

    /**
     *  组件实例对象
     */
    export default {
        components: {

        },
        data: function(){
            return{
                isClick: false,
                selectedIdentityId : '',
            }
        },
        vuex: {
            getters: {

            },
            actions: {

            }
        },
        methods: {
            /**
             * 初始化
             * @method init
             * @public
             * @return {Null} void
             */
            init (){
                this.selectedIdentityId = util.getUrddataString('clean_cycle')                
                
            },
            //选择角色
            setType (typeId){
                if(this.isClick){
                    return
                }
                this.isClick = true
                let memberList = {
                    id: typeId
                }
                cache.getMemoryCache('webViewID',function(data){
                    if(data){
                        setTimeout(() =>{ 
                            commonPage.goBack(1,{'key':'goXmmerberClean','value':memberList},data.webViewID)},200)
                        // commonPage.goBack(1,{'key':'selectRole','value':memberList})
                    }
                })
            }
        },
        created(){

            this.init();
            
        }
        
    }

    
</script>

<!-- CSS 样式 -->
<!-- <style src="static/css/global.css"></style> -->
<style src="../../node_modules/weui/dist/style/weui.css"></style>
<style src="../../static/css/common.css"></style>
<style src="../../static/css/project.css"></style>
<style>
    .weui-cells_radio .weui-check:checked + .weui-icon-checked:before {
      display: block;
      content: "";
      width: 18px;
      height: 18px;
      background-image: url(../../static/imgs/single_selected.png);
      background-size: 18px 18px;
      overflow: hidden;
    }
</style>



